package com.example.newsdaily;

import com.alibaba.fastjson.JSONObject;
import com.example.newsdaily.entity.TUser;
import com.example.newsdaily.utl.ContainUtil;
import com.example.newsdaily.utl.LocalDataUtil;
import ohos.aafwk.ability.AbilityPackage;

public class MyApplication extends AbilityPackage {

    public static TUser tuser;
    @Override
    public void onInitialize() {
        super.onInitialize();
        LocalDataUtil.initDB(this,"pin");

        if(tuser == null) {
            try {
                tuser = JSONObject.parseObject(ContainUtil.USER_OBJECT_KEY, TUser.class);
            } catch (Exception e) {}
        }
    }
}
